﻿using System;

namespace Mvvm.Common.WindowExtensions
{
    /// <summary>
    /// Top most  option
    /// <para>bb 2020-05-26 17:39:58</para>
    /// </summary>
    public class TopMostOption
    {
        /// <summary>
        /// 是否取消
        /// </summary>
        internal bool IsCancel { get; private set; } = false;
        /// <summary>
        /// 检测是否top的时间间隔
        /// <para>默认1秒</para>
        /// </summary>
        public TimeSpan CheckTopInterval { get; set; } = TimeSpan.FromSeconds(1);
        /// <summary>
        /// 是否一直设置topmost属性
        /// <para>默认为true</para>
        /// </summary>
        public bool IsAlways { get; set; } = true;
        /// <summary>
        /// 取消top
        /// </summary>
        public void Cancel()
        {
            IsCancel = true;
        }
    }
}